package com.jm.web;


import com.jm.utils.StringBuilderEx;

/**
 * @author yanjie
 *
 * 2011/09/17 8:34:37 AM
 */
public class GridPage extends BaseDAPage{
	
	@Override
	protected void OnLoad() {
		StringBuilderEx sb = new StringBuilderEx();
		sb.Append("$P.setDefaultAction('search');");
		this.RegisterOnReadyScript(SCRIPTRUN_REALTIME, sb.toString());
		
//		sb.Reset();
//		sb.Append("$('#action').val('search');");
//		this.RegisterOnReadyScript(SCRIPTRUN_ONREADY, sb.toString());
		
		//設置表格頁面默認有哪些按鈕默認啟用
		this.getBtnDisabledConfig().put("search", false);
		
		//打開filter按鈕
		this.setFilterEnab(true);
		super.OnLoad();
	};
	
	@Override
	public String outputHiddenItem() {
		StringBuilderEx sb = new StringBuilderEx();
		sb.Append(super.outputHiddenItem());
		sb.Append("\r\n<input type=\"hidden\" id=\"pagetype\" name=\"pagetype\" value=\"grid\" />");
		return sb.toString();
	}
}
